package sn.functions;

public class StepFunction implements ActivationFunction {

	private double theta;

	public StepFunction(double theta){
		this.theta = theta;
	}
	
	@Override
	public double compute(double x) {
		if (x>theta)
			return 1.;
		return 0.;
	}

	@Override
	public double derivative(double x) {
		return 1;
	}

}
